﻿namespace NJQuery.Configuration {
	using System.Configuration;

	/// <summary>
	/// Defines configuration settings pertaining to the <see href="http://jqueryui.com/docs/Theming">jQuery UI theme</see>.
	/// This class cannot be inherited.
	/// </summary>
	public sealed class ThemesSection : ConfigurationElement {


		#region Constructors

		/// <summary>
		/// This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
		/// Creates a new instance of the <see cref="ThemesSection"/> class.
		/// </summary>
		public ThemesSection() { }

		#endregion


		#region Properties

		/// <summary>
		/// Gets or set the default <see href="http://jqueryui.com/docs/Theming">jQuery UI theme</see> used by the jQuery <see cref="Manager"/>.  If omitted, the value "base" will be used.
		/// </summary>
		[ConfigurationProperty("defaultTheme", DefaultValue = "base", IsRequired = false)]
		public string DefaultTheme {
			get { return this["defaultTheme"] as string; }
			set { this["defaultTheme"] = value; }
		}

		/// <summary>
		/// Gets a collection of themes that will be treated as custom themes whenever a combined <see href="http://jqueryui.com/">jQuery UI</see> combined stylesheet with the invariant name "ui" is defined as having the current theme "*theme*" replacement value within the URL in the <see cref="ClientStylesSection.References">ClientStylesSection.References</see> collection.
		/// In this scenario, the combined URL will be given the "base" theme and a separate overriding stylesheet reference will be included.  These themes can collectively be defined in the references collection with the invariant name "ui.customtheme" if necessary.
		/// See <see cref="ClientStyle"/> for more information on the applicable invariant names and URL conventions.
		/// </summary>
		[ConfigurationProperty("customThemes")]
		public ThemeCollection CustomThemes {
			get { return this["customThemes"] as ThemeCollection; }
		}

		#endregion


	}

}